An electronic device comprising a processor for processing computer executable instructions to control operation of the device can typically operate in one of one or more operating states. An operating state may be defined by the program or application that is being executed on the electronic device or any other parameter or feature of the electronic device. For example, a simple electronic device may operate in either a boot operating state where the electronic device is executing a boot process, or a normal operating state where the electronic device is executing an application or program.
Each operating state is typically associated with one or more blocks of memory which can be accessed while the electronic device is operating in that operating state. The memory block(s) associated with a particular operating state may be used to store executable instructions and/or data that allow the electronic device to operating in the particular state. For example, in the simple electronic device described above, the boot operating state may be associated with one or more blocks of BOOT read only memory (ROM) which are used to store executable instructions and/or data associated with the boot process; and the normal operating state may be associated with one or more blocks of random access memory (RAM) which are used to store executable instructions and/or data associated with the application or program.
If an electronic device is operating in a particular operating state and accesses memory that is not associated with the particular operating state then there has been an out-of-bounds memory access violation, which may be referred to herein as an out-of-bounds violation. For example, if the simple electronic device described above accesses the one or more blocks of RAM associated with the normal operating state during the boot process then there has been an out-of-bounds violation. Similarly, if the electronic device accesses the BOOT ROM after the boot process has completed then there has been an out-of-bounds violation.
An out-of-bounds violation may cause the electronic device to behave unpredictably since the accessed memory location does not contain known or expected data or content.
The embodiments described below are provided by way of example only and are not limiting of implementations which solve any or all of the disadvantages of known methods and systems for addressing out-of-bounds violations.